<? global $lg, $FullUrl, $notice; ?>
<?
	$level = $userPlayer['level'];
	
	$sql = "SELECT * FROM `giftknb` WHERE playerId ='".$userPlayer['playerId']."'";
	//$db->getRow($sql);
	$sql1 = $sql . " and lvl = '50'";
	$sql2 = $sql . " and lvl = '55'";
	$sql3 = $sql . " and lvl = '60'";
	$sql4 = $sql . " and lvl = '65'";
	$sql5 = $sql . " and lvl = '70'";
	
	$flash1 = $flash2 = $flash3 = $flash4 = $flash5 = '0';
	$href1 = $href2 = $href3 = $href4 = $href5 = '';
	
	$arr1 = $db->getRow($sql1);
	if(count($arr1) == '0')
	{
		$flash1 = '1';	
		$href1 = $FullUrl."/index.php?do=player&act=giftlvlsm1";
	}
	
	$arr2 = $db->getRow($sql2);
	if(count($arr2) == '0')
	{
		$flash2 = '1';	
		$href2 = $FullUrl."/index.php?do=player&act=giftlvlsm2";
	}
	
	$arr3 = $db->getRow($sql3);
	if(count($arr3) == '0')
	{
		$flash3 = '1';	
		$href3 = $FullUrl."/index.php?do=player&act=giftlvlsm3";
	}
	
	$arr4 = $db->getRow($sql4);
	if(count($arr4) == '0')
	{
		$flash4 = '1';	
		$href4 = $FullUrl."/index.php?do=player&act=giftlvlsm4";
	}
	
	$arr5 = $db->getRow($sql5);
	if(count($arr5) == '0')
	{
		$flash5 = '1';	
		$href5 = $FullUrl."/index.php?do=player&act=giftlvlsm5";
	}
?>
<div class="form-main">
  <div class="form-header">&nbsp;</div>
  <div class="form-content">
    <div style="padding:0 25px; display:block; overflow:hidden;">
      <div class="title-form"><span>Gift Level:<?=$level?></span></div>
      
      <div class="nhan-knb">
        <ul>
          <li><span>Level 50 bạn nhân được 1,000 &nbsp;<img src="<?=$FullUrl?>/templates/themes/game2/images/knb.png" width="22"/></span> <a href="<?=$href1?>"><img src="<?=$FullUrl?>/templates/themes/game2/images/gold_bar<?=($flash1 == '1')?'':'_inactive'?>.png" width="22"/></a></li>
          <li><span>Level 55 bạn nhân được 2,000 &nbsp;<img src="<?=$FullUrl?>/templates/themes/game2/images/knb.png" width="22"/></span> <a href="<?=$href2?>"><img src="<?=$FullUrl?>/templates/themes/game2/images/gold_bar<?=($flash2 == '1')?'':'_inactive'?>.png" width="22"/></a></li>
          <li><span>Level 60 bạn nhân được 4,000 &nbsp;<img src="<?=$FullUrl?>/templates/themes/game2/images/knb.png" width="22"/></span> <a href="<?=$href3?>"><img src="<?=$FullUrl?>/templates/themes/game2/images/gold_bar<?=($flash3 == '1')?'':'_inactive'?>.png" width="22"/></a></li>
          <li><span>Level 65 bạn nhân được 7,000 &nbsp;<img src="<?=$FullUrl?>/templates/themes/game2/images/knb.png" width="22"/></span> <a href="<?=$href4?>"><img src="<?=$FullUrl?>/templates/themes/game2/images/gold_bar<?=($flash4 == '1')?'':'_inactive'?>.png" width="22"/></a></li>
          <li><span>Level 70 bạn nhân được 10,000 <img src="<?=$FullUrl?>/templates/themes/game2/images/knb.png" width="22"/></span> <a href="<?=$href5?>"><img src="<?=$FullUrl?>/templates/themes/game2/images/gold_bar<?=($flash5 == '1')?'':'_inactive'?>.png" width="22"/></a></li>
        </ul>
      </div>
      <!--<form action="<?=$FullUrl?>/index.php?do=player&act=giftlvlsm1" method="post" name="reg">
      	<label class="giftlvl">Level 50</label>
        <input value="Nhận KNB" name=reg type="submit" class="btn-form sbm">
      </form>--> 
    </div>
  </div>
  <div class="form-bottom">&nbsp;</div>
</div>
<?php Template::UserControlTPL('Menu-GD'); ?>
